﻿using UnityEngine;

[CreateAssetMenu(fileName = "ItemHealthPotion", menuName = "游戏SO文件/物品/血瓶")]
public class ItemHealthPotion : InventoryItem
{
    [Header("配置")]
    public float HealthValue;

    public override bool UseItem()
    {
        if (GameManager.instance.Player.PlayerHealth.CanRestoreHealth())
        {
            GameManager.instance.Player.PlayerHealth.RestoreHealth(HealthValue);
            return true;
        }
        
        return false;
    }
}